<?php
namespace app\validate;

use think\Validate;

class CheckCourseware extends Validate
{

    protected $rule =   [
        'title'  => 'require|length:2,200',
        'e_title'  => 'require|length:2,200',
        'duration'  => 'require|float',
        'cate_id'  => 'require',
        'label_id'  => 'require',
        'open'  => 'require',
    ];

    protected $message  =   [
        'title.require' => '请填写轮播标题！',
        'title.length' => '轮播标题在2-50个字符之间！',
        'duration.require' => '请填写课件时长！',
        'duration.float' => '课件时长只可填写数字！',
        'label_id.require' => '请选择课件标签！',
        'open.require' => '请选择是否公开！',
    ];

}